﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace Boggle.Client
{
    /// <summary>
    /// Contains commands supported by the Boggle game.
    /// </summary>
    internal static class BoggleCommands
    {
        /// <summary>
        /// Gets a command which is used to start an existing game.
        /// </summary>
        public static RoutedUICommand StartGameCommand { get; private set; }
        
        /// <summary>
        /// Gets a command which is used to submit a word.
        /// </summary>
        public static RoutedUICommand SubmitWordCommand { get; private set; }

        /// <summary>
        /// Gets a command which is used to end a game in progress.
        /// </summary>
        public static RoutedUICommand EndGameCommand { get; private set; }

        /// <summary>
        /// Gets a command which is used to create a new game.
        /// </summary>
        public static RoutedUICommand NewGameCommand { get; private set; }

        /// <summary>
        /// Gets a command which is used to open the options dialog.
        /// </summary>
        public static RoutedUICommand ViewOptionsCommand { get; private set; }

        /// <summary>
        /// Gets a command which is used to minimize a window.
        /// </summary>
        public static RoutedUICommand MinimizeWindowCommand { get; private set; }

        /// <summary>
        /// Initializes the command properties.
        /// </summary>
        static BoggleCommands()
        {
            StartGameCommand = new RoutedUICommand("Start Game", "StartGameCommand", typeof(BoggleCommands), 
                new InputGestureCollection { new KeyGesture(Key.S, ModifierKeys.Control) });
            SubmitWordCommand = new RoutedUICommand("Submit Word", "SubmitWordCommand", typeof(BoggleCommands), 
                new InputGestureCollection { new KeyGesture(Key.Enter) });
            EndGameCommand = new RoutedUICommand("End Game", "EndGameCommand", typeof(BoggleCommands), 
                new InputGestureCollection { new KeyGesture(Key.E, ModifierKeys.Control) });
            NewGameCommand = new RoutedUICommand("New Game", "NewGameCommand", typeof(BoggleCommands), 
                new InputGestureCollection { new KeyGesture(Key.N, ModifierKeys.Control) });
            ViewOptionsCommand = new RoutedUICommand("Options", "ViewOptionsCommand", typeof(BoggleCommands));
            MinimizeWindowCommand = new RoutedUICommand("Minimize", "MinimizeWindowCommand", typeof(BoggleCommands));
        }
    }
}
